import {defineConfig} from 'vite';
import path from 'path';
import vue from '@vitejs/plugin-vue';
import requireTransform from 'vite-plugin-require-transform';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        requireTransform({
            fileRegex: /.js$|.vue$/,
        }),
    ],
    server: {
        host: '0.0.0.0',
    },
    resolve: {
        //别名配置
        alias: {
            '@assets': path.join(__dirname, 'src/assets'),
        },
    },
});
